/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "ProvisionedDataSets.h"

namespace oai::udr::model {

ProvisionedDataSets::ProvisionedDataSets() {
  m_AmDataIsSet = false;
  m_SmfSelDataIsSet = false;
  m_SmsSubsDataIsSet = false;
  m_SmDataIsSet = false;
  m_TraceDataIsSet = false;
  m_SmsMngDataIsSet = false;
  m_LcsPrivacyDataIsSet = false;
  m_LcsMoDataIsSet = false;
  m_LcsBcaDataIsSet = false;
  m_V2xDataIsSet = false;
}

ProvisionedDataSets::~ProvisionedDataSets() {}

void ProvisionedDataSets::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const ProvisionedDataSets &o) {
  j = nlohmann::json();
  if (o.amDataIsSet())
    j["amData"] = o.m_AmData;
  if (o.smfSelDataIsSet())
    j["smfSelData"] = o.m_SmfSelData;
  if (o.smsSubsDataIsSet())
    j["smsSubsData"] = o.m_SmsSubsData;
  if (o.smDataIsSet() || !o.m_SmData.empty())
    j["smData"] = o.m_SmData;
  if (o.traceDataIsSet())
    j["traceData"] = o.m_TraceData;
  if (o.smsMngDataIsSet())
    j["smsMngData"] = o.m_SmsMngData;
  if (o.lcsPrivacyDataIsSet())
    j["lcsPrivacyData"] = o.m_LcsPrivacyData;
  if (o.lcsMoDataIsSet())
    j["lcsMoData"] = o.m_LcsMoData;
  if (o.lcsBcaDataIsSet())
    j["lcsBcaData"] = o.m_LcsBcaData;
  if (o.v2xDataIsSet())
    j["v2xData"] = o.m_V2xData;
}

void from_json(const nlohmann::json &j, ProvisionedDataSets &o) {
  if (j.find("amData") != j.end()) {
    j.at("amData").get_to(o.m_AmData);
    o.m_AmDataIsSet = true;
  }
  if (j.find("smfSelData") != j.end()) {
    j.at("smfSelData").get_to(o.m_SmfSelData);
    o.m_SmfSelDataIsSet = true;
  }
  if (j.find("smsSubsData") != j.end()) {
    j.at("smsSubsData").get_to(o.m_SmsSubsData);
    o.m_SmsSubsDataIsSet = true;
  }
  if (j.find("smData") != j.end()) {
    j.at("smData").get_to(o.m_SmData);
    o.m_SmDataIsSet = true;
  }
  if (j.find("traceData") != j.end()) {
    j.at("traceData").get_to(o.m_TraceData);
    o.m_TraceDataIsSet = true;
  }
  if (j.find("smsMngData") != j.end()) {
    j.at("smsMngData").get_to(o.m_SmsMngData);
    o.m_SmsMngDataIsSet = true;
  }
  if (j.find("lcsPrivacyData") != j.end()) {
    j.at("lcsPrivacyData").get_to(o.m_LcsPrivacyData);
    o.m_LcsPrivacyDataIsSet = true;
  }
  if (j.find("lcsMoData") != j.end()) {
    j.at("lcsMoData").get_to(o.m_LcsMoData);
    o.m_LcsMoDataIsSet = true;
  }
  if (j.find("lcsBcaData") != j.end()) {
    j.at("lcsBcaData").get_to(o.m_LcsBcaData);
    o.m_LcsBcaDataIsSet = true;
  }
  if (j.find("v2xData") != j.end()) {
    j.at("v2xData").get_to(o.m_V2xData);
    o.m_V2xDataIsSet = true;
  }
}

AccessAndMobilitySubscriptionData ProvisionedDataSets::getAmData() const {
  return m_AmData;
}
void ProvisionedDataSets::setAmData(
    AccessAndMobilitySubscriptionData const &value) {
  m_AmData = value;
  m_AmDataIsSet = true;
}
bool ProvisionedDataSets::amDataIsSet() const { return m_AmDataIsSet; }
void ProvisionedDataSets::unsetAmData() { m_AmDataIsSet = false; }
SmfSelectionSubscriptionData ProvisionedDataSets::getSmfSelData() const {
  return m_SmfSelData;
}
void ProvisionedDataSets::setSmfSelData(
    SmfSelectionSubscriptionData const &value) {
  m_SmfSelData = value;
  m_SmfSelDataIsSet = true;
}
bool ProvisionedDataSets::smfSelDataIsSet() const { return m_SmfSelDataIsSet; }
void ProvisionedDataSets::unsetSmfSelData() { m_SmfSelDataIsSet = false; }
SmsSubscriptionData ProvisionedDataSets::getSmsSubsData() const {
  return m_SmsSubsData;
}
void ProvisionedDataSets::setSmsSubsData(SmsSubscriptionData const &value) {
  m_SmsSubsData = value;
  m_SmsSubsDataIsSet = true;
}
bool ProvisionedDataSets::smsSubsDataIsSet() const {
  return m_SmsSubsDataIsSet;
}
void ProvisionedDataSets::unsetSmsSubsData() { m_SmsSubsDataIsSet = false; }
std::vector<SessionManagementSubscriptionData> &
ProvisionedDataSets::getSmData() {
  return m_SmData;
}
void ProvisionedDataSets::setSmData(
    std::vector<SessionManagementSubscriptionData> const &value) {
  m_SmData = value;
  m_SmDataIsSet = true;
}
bool ProvisionedDataSets::smDataIsSet() const { return m_SmDataIsSet; }
void ProvisionedDataSets::unsetSmData() { m_SmDataIsSet = false; }
TraceData ProvisionedDataSets::getTraceData() const { return m_TraceData; }
void ProvisionedDataSets::setTraceData(TraceData const &value) {
  m_TraceData = value;
  m_TraceDataIsSet = true;
}
bool ProvisionedDataSets::traceDataIsSet() const { return m_TraceDataIsSet; }
void ProvisionedDataSets::unsetTraceData() { m_TraceDataIsSet = false; }
SmsManagementSubscriptionData ProvisionedDataSets::getSmsMngData() const {
  return m_SmsMngData;
}
void ProvisionedDataSets::setSmsMngData(
    SmsManagementSubscriptionData const &value) {
  m_SmsMngData = value;
  m_SmsMngDataIsSet = true;
}
bool ProvisionedDataSets::smsMngDataIsSet() const { return m_SmsMngDataIsSet; }
void ProvisionedDataSets::unsetSmsMngData() { m_SmsMngDataIsSet = false; }
LcsPrivacyData ProvisionedDataSets::getLcsPrivacyData() const {
  return m_LcsPrivacyData;
}
void ProvisionedDataSets::setLcsPrivacyData(LcsPrivacyData const &value) {
  m_LcsPrivacyData = value;
  m_LcsPrivacyDataIsSet = true;
}
bool ProvisionedDataSets::lcsPrivacyDataIsSet() const {
  return m_LcsPrivacyDataIsSet;
}
void ProvisionedDataSets::unsetLcsPrivacyData() {
  m_LcsPrivacyDataIsSet = false;
}
LcsMoData ProvisionedDataSets::getLcsMoData() const { return m_LcsMoData; }
void ProvisionedDataSets::setLcsMoData(LcsMoData const &value) {
  m_LcsMoData = value;
  m_LcsMoDataIsSet = true;
}
bool ProvisionedDataSets::lcsMoDataIsSet() const { return m_LcsMoDataIsSet; }
void ProvisionedDataSets::unsetLcsMoData() { m_LcsMoDataIsSet = false; }
LcsBroadcastAssistanceTypesData ProvisionedDataSets::getLcsBcaData() const {
  return m_LcsBcaData;
}
void ProvisionedDataSets::setLcsBcaData(
    LcsBroadcastAssistanceTypesData const &value) {
  m_LcsBcaData = value;
  m_LcsBcaDataIsSet = true;
}
bool ProvisionedDataSets::lcsBcaDataIsSet() const { return m_LcsBcaDataIsSet; }
void ProvisionedDataSets::unsetLcsBcaData() { m_LcsBcaDataIsSet = false; }
V2xSubscriptionData ProvisionedDataSets::getV2xData() const {
  return m_V2xData;
}
void ProvisionedDataSets::setV2xData(V2xSubscriptionData const &value) {
  m_V2xData = value;
  m_V2xDataIsSet = true;
}
bool ProvisionedDataSets::v2xDataIsSet() const { return m_V2xDataIsSet; }
void ProvisionedDataSets::unsetV2xData() { m_V2xDataIsSet = false; }

} // namespace oai::udr::model
